<html>
<head>
	<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=utf-8">
	<title>Jsswing FlowLayout Demo</title>
	<link rel="stylesheet" type="text/css" href="ext2/resources/css/ext-all.css" />
	<script type="text/javascript" src="ext2/adapter/ext/ext-base.js"></script>
	<script type="text/javascript" src="ext2/ext-core-debug.js"></script>	
		
	<script type="text/javascript" src="js/jsswing.js"></script>
	<script>
	Ext.BLANK_IMAGE_URL = 'ext2/resources/images/default/s.gif';
	
	jsw.ROOT_DIR='.';
	//jsw.debugEnabled=true;
	var MyListener=function(label){
		this.status=label;
	};
	Ext.extend(MyListener,jsw.event.MouseListener,{
			mouseClicked:function(mouseEvent){
			},
			mouseEntered:function(mouseEvent){
				this.status.setText(mouseEvent.getSource().getImageUrl());
			},
			mouseExited:function(mouseEvent){
				this.status.setText("");
			}
	});
	
	
	
	Ext.onReady(
		function(){
			var doc=jsw.BrowserDocument.getInstance();
			
			
			var label= new jsw.JLabel();
			
			label.setForeground("white");
			
			var pstatus=new jsw.JPanel();
			pstatus.setLayout(new jsw.BoxLayout(pstatus,jsw.BoxLayout.X_AXIS));
			pstatus.add(label);
			pstatus.setBorder(new jsw.border.ShadowBorder());
			pstatus.setBackgroundImg(jsw.ROOT_DIR+"/js/img/ui/tran.png");
			
			
			var app= new MyListener(label);
			var panel=new jsw.JPanel();
			
			var image=new jsw.NetImgLabel(jsw.ROOT_DIR+"/js/img/demo/sample04.jpg");
			image.setBorder(new jsw.border.ShadowBorder());
			image.addMouseListener(app);
			panel.add(image);
			
			image=new jsw.NetImgLabel(jsw.ROOT_DIR+"/js/img/demo/sample03.jpg",jsw.NetImgLabel.LOCK_WIDTH,200);
			image.setBorder(new jsw.border.ShadowBorder());
			image.addMouseListener(app);
			panel.add(image);
			
			image=new jsw.NetImgLabel(jsw.ROOT_DIR+"/js/img/demo/sample02.jpg",jsw.NetImgLabel.LOCK_WIDTH,100);
			image.setBorder(new jsw.border.ShadowBorder());
			image.addMouseListener(app);
			panel.add(image);
			
			image=new jsw.NetImgLabel(jsw.ROOT_DIR+"/js/img/demo/sample01.jpg",jsw.NetImgLabel.LOCK_WIDTH,80);
			image.setBorder(new jsw.border.ShadowBorder());
			image.addMouseListener(app);
			panel.add(image);
			
			panel.setForeground("#ffffff");
			panel.setBorder(new jsw.border.ShadowBorder());
			panel.setBackgroundImg(jsw.ROOT_DIR+"/js/img/ui/tran.png");
			doc.add(panel);
			
			
			doc.add(pstatus);
			
			doc.setBackgroundImg(jsw.ROOT_DIR+"/js/img/ui/wallpaper.jpg");
			doc.setLayout(new jsw.BoxLayout(doc,jsw.BoxLayout.Y_AXIS));
			jsw.debug(" start visible");
			doc.setVisible(true);//set everything visible
			jsw.debug(" end visible");	
		});
	</script>
</head>
<body>

</body>
</html>